  <script type="text/javascript">

	var grid_reload = function(){
		$('#datagrid').datagrid('reload', $('#fm_search').serializeObject());
	};

		$('#datagrid').datagrid({  
			url:gs_path+'/'+controller+'/getdata', 
			queryParams: $('#fm_search').serializeObject(),
			height:340,
			pagination:true,
			columns:[[
				{ field : 'ck', checkbox:true, width: 40, align: 'center', rowspan:2},	
				{ field : 'no_event', title : 'No Event', width:120, sortable:true, rowspan:2},
				{ field : 'no_surat', title : 'No Surat ', width:150, sortable:true, rowspan:2},
				{ field : 'nama_event', title : 'Nama Kegiatan', width:200, sortable:true, rowspan:2},
				{ field : 'tanggal_mulai_kegiatan', title : 'Tanggal Mulai Kegiatan', width:150, sortable:true, rowspan:2},
				{ field : 'tanggal_selesai_kegiatan', title : 'Tanggal Selesai Kegiatan', width:150, sortable:true, rowspan:2},
				{ field : 'jam_kegiatan', title : 'Jam Kegiatan', width:150, sortable:true, rowspan:2},
				{ field : 'jenis_event', title : 'Jenis Event', width:150, sortable:true, rowspan:2},
				{ field : 'izin_kepolisian', title : 'Izin Kepolisian ', width:150, sortable:true, rowspan:2},
				{ field : 'keterangan', title : 'Keterangan', width:200, sortable:true, rowspan:2},
				]]
		});

		// Set Action Button aa
		var buttons = [ { label: 'Add', icon: 'add', onclick: function() {
							loadPage('/'+controller+'/create');						
						} },
						{ label: 'Edit', icon: 'edit', onclick: function() {
							$("#uploaderform").append("<form action='<?php echo str_replace('index.php/', '', base_url()); ?>/pro_event/uploads_data' method='post' enctype='multipart/form-data' name='UploadForm' id='UploadForm'><p>Max. File 1MB!</p><label>Files</label><div id='AddFileInputBox'><input id='fileInputBox' style='margin-bottom: 5px;' type='file'  name='file[]' multiple='multiple'/></div><div class='sep_s'></div>    <button type='submit' class='button' id='SubmitButton'>Upload</button>    <div id='progressbox'><div id='progressbar'></div ><div id='statustxt'>0%</div ></div></form>");
							var oSel=$('#datagrid').datagrid('getSelected'); 
							if(oSel==null){ alert('Please select row!'); }
							else{ 
								loadPage('/'+controller+'/edit/'+oSel.no_event);	
							} 
						} },
						{label: 'Delete', icon: 'delete', onclick: function() { 
							var oSel = $('#datagrid').datagrid('getSelected'); 
							if (oSel == null) { 
								$.messager.alert('&nbsp;', gs_msg_row_unselected, 'warning'); 
							} else { 
								deleteData(['no_event']);
							} 
						}}];
		setAction(buttons);
		
		
		$('#fm_search').focusFirst();






//--><!]]></script>

<div id="tb" style="padding:5px;height:auto">
    <div>
        <form id="fm_search" onsubmit="grid_reload(); return false;">
        	<table class="tb_form" style="margin-bottom:0px">
            <tr>
            	<td width="100">Keyword</td>
                <td><input type="text" id="keyword" name="keyword" class="textfield medium" />
                	<a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="grid_reload(); return false;">Search</a>
                </td>
            </tr>
            </table>
        </form>
    </div>
</div>
<div id="datagrid" toolbar="#tb"></div>